home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglblendequationext.z / fglblendequationext
Text File  |  1998-10-20  |  13KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))        OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee        ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT - set the blend equation
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT( INTEGER*4 _m_o_d_e )
  14.  
  15.  
  16. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  17.      _m_o_d_e  specifies how source and destination colors are combined.  It must
  18.            be GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT, GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT,
  19.            GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT, GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT, GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT, or
  20.            GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP.
  21.  
  22.  
  23. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  24.      The blend equation determines how a new pixel (the ``source'' color) is
  25.      combined with a pixel already in the framebuffer (the ``destination''
  26.      color).
  27.  
  28.      GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT
  29.           sets the blend equation so that each component of the result color
  30.           is the minimum of the corresponding components of the source and
  31.           destination colors.
  32.  
  33.      GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT
  34.           sets the blend equation so that each component of the result color
  35.           is the maximum of the corresponding components of the source and
  36.           destination colors.
  37.  
  38.      GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP
  39.           sets the blend equation so that each component of the result color
  40.           is a bitwise logical combination of the corresponding components of
  41.           the source and destination colors.  Use the ffffggggllllLLLLooooggggiiiiccccOOOOpppp command to
  42.           specify the logical operator.
  43.  
  44.      The remaining blend equations use the source and destination blend
  45.      factors specified by ffffggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc.  See ffffggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc for a description of
  46.      the various blend factors.
  47.  
  48.      In the equations that follow, source and destination color components are
  49.      referred to as (Rs,Gs,Bs,As) and (Rd,Gd,Bd,Ad), respectively.  The result
  50.      color is referred to as (Rr,Gr,Br,Ar).  The source and destination blend
  51.      factors are denoted (sR,sG,sB,sA) and (dR,dG,dB,dA), respectively.  For
  52.      these equations all color components are understood to have values
  53.      between 0.0 and 1.0, inclusive.
  54.  
  55.      GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT
  56.           sets the blend equation so that the source and destination data are
  57.           added.  Each component of the source color is multiplied by the
  58.           corresponding source factor, then each component of the destination
  59.           color is multiplied by the corresponding destination factor.  The
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))        OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee        ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))
  71.  
  72.  
  73.  
  74.           result is the componentwise sum of the two products, clamped to the
  75.           range [0,1].
  76.  
  77.                              Rr = min(1,  Rs sR  +  Rd dR)
  78.                              Gr = min(1,  Gs sG  +  Gd dG)
  79.                              Br = min(1,  Bs sB  +  Bd dB)
  80.                              Ar = min(1,  As sA  +  Ad dA)
  81.  
  82.      GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT
  83.           Is like GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT except the product of the destination factor
  84.           and the destination color is componentwise subtracted from the
  85.           product of the source factor and the source color.  The result is
  86.           clamped to the range [0,1].
  87.                              Rr = max(0,  Rs sR  -  Rd dR)
  88.                              Gr = max(0,  Gs sG  -  Gd dG)
  89.                              Br = max(0,  Bs sB  -  Bd dB)
  90.                              Ar = max(0,  As sA  -  Ad dA)
  91.  
  92.      GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT
  93.           Is like GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT except the product of the source factor and
  94.           the source color is componentwise subtracted from the product of the
  95.           destination factor and the destination color.  The result is clamped
  96.           to the range [0,1].
  97.                              Rr = max(0,  Rd dR  -  Rs sR)
  98.                              Gr = max(0,  Gd dG  -  Gs sG)
  99.                              Br = max(0,  Bd dB  -  Bs sB)
  100.                              Ar = max(0,  Ad dA  -  As sA)
  101.  
  102.  
  103.      The GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT and GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT equations are useful for applications that
  104.      analyze image data (image thresholding against a constant color, for
  105.      example).  The GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP equation is most commonly used with GGGGLLLL____XXXXOOOORRRR for
  106.      reversible drawing.  The GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT equation is useful for anti-
  107.      aliasing and transparency, among other things.
  108.  
  109.      Initially the blend equation is set to GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT.
  110.  
  111. NNNNOOOOTTTTEEEESSSS
  112.      The GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT, GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT, and GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP equations do not use the
  113.      source or destination factors, only the source and destination colors.
  114.  
  115. EEEERRRRRRRROOOORRRRSSSS
  116.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _m_o_d_e is not one of GGGGLLLL____FFFFUUUUNNNNCCCC____AAAADDDDDDDD____EEEEXXXXTTTT,
  117.      GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT, GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT, GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT,
  118.      GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT, or GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP.
  119.  
  120.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT is executed
  121.      between the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  122.      ffffggggllllEEEEnnnndddd.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))        OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee        ffffggggllllBBBBlllleeeennnnddddEEEEqqqquuuuaaaattttiiiioooonnnnEEEEXXXXTTTT((((3333GGGG))))
  137.  
  138.  
  139.  
  140. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  141.      ffffggggllllGGGGeeeetttt with an argument of GGGGLLLL____BBBBLLLLEEEENNNNDDDD____EEEEQQQQUUUUAAAATTTTIIIIOOOONNNN____EEEEXXXXTTTT.
  142.  
  143.      ffffggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg with an argument of GGGGLLLL____EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS.
  144.           This feature is not part of standard GL. The extensions string of
  145.           ffffggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg will contain the name bbbblllleeeennnndddd____mmmmiiiinnnnmmmmaaaaxxxx if GGGGLLLL____MMMMIIIINNNN____EEEEXXXXTTTT and
  146.           GGGGLLLL____MMMMAAAAXXXX____EEEEXXXXTTTT are supported.  It will contain the name bbbblllleeeennnndddd____llllooooggggiiiicccc____oooopppp
  147.           if GGGGLLLL____LLLLOOOOGGGGIIIICCCC____OOOOPPPP is supported in RGB mode. It will contain the name
  148.           bbbblllleeeennnndddd____ssssuuuubbbbttttrrrraaaacccctttt if GGGGLLLL____FFFFUUUUNNNNCCCC____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT and
  149.           GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT are supported.
  150.  
  151.  
  152. MMMMAAAACCCCHHHHIIIINNNNEEEE DDDDEEEEPPPPEEEENNNNDDDDEEEENNNNCCCCIIIIEEEESSSS
  153.      RealityEngine, RealityEngine2, and VTX systems do not support the use of
  154.      blend factor GGGGLLLL____SSSSRRRRCCCC____AAAALLLLPPPPHHHHAAAA____SSSSAAAATTTTUUUURRRRAAAATTTTEEEE with blend equation
  155.      GGGGLLLL____FFFFUUUUNNNNCCCC____RRRREEEEVVVVEEEERRRRSSSSEEEE____SSSSUUUUBBBBTTTTRRRRAAAACCCCTTTT____EEEEXXXXTTTT; this combination produces incorrect
  156.      results.
  157.  
  158.  
  159. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  160.      ffffggggllllGGGGeeeettttSSSSttttrrrriiiinnnngggg, ffffggggllllBBBBlllleeeennnnddddCCCCoooolllloooorrrrEEEEXXXXTTTT, ffffggggllllBBBBlllleeeennnnddddFFFFuuuunnnncccc.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.